<template>
	<view>
		<rich-text :nodes="textData.content"></rich-text>
		<view class="live">
		<!-- 	<view class="live_title">
				<view class="left_line">
		
				</view>
				<view class="text">
					<u-icon name="heart-fill" color="#FF3636" size="28" style="margin-right: 6upx;"></u-icon>你可能还喜欢
				</view>
				<view class="right_line">
		
				</view>
			</view> -->
		
			<goodsVideoList :goodsList="likeGoodsList" :scrollHeight="`calc(100vh - 56rpx)`" />
		</view>
		
		<rich-text :nodes="textData.content_s"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:'',
				textData:'',
				likeGoodsList:[]
			}
		},
		onLoad(e) {
			this.id = e.id
			this.upData()
			
		},
		methods: {
			upData(){
				this.$myRuquest('home/index/news_det', {
					id: this.id,	
				}).then(res => {

					this.textData=res.data.news
					const regex = new RegExp('<img', 'gi');
					this.textData.content= this.textData.content.replace(regex, `<img style="max-width: 100%;"`);
					this.textData.content_s= this.textData.content_s.replace(regex, `<img style="max-width: 100%;"`);
					this.likeGoodsList=res.data.activity_list
				})
			}
		}
	}
</script>

<style lang="scss">
	.live {
			background-color: #FAFAFA;
			padding: 0 30upx;
	
			.live_title {
				display: flex;
				align-items: center;
				padding: 0 120upx;
	
				.left_line {
					flex: 1;
					height: 4upx;
					background-image: linear-gradient(to right, #FAFAFA, #FF3636);
				}
	
				.text {
					display: flex;
					font-size: 28upx;
					color: #333333;
					padding: 0 14upx;
					height: 56upx;
					line-height: 56upx;
					font-weight: 700;
				}
	
				.right_line {
					flex: 1;
					height: 4upx;
					background-image: linear-gradient(to left, #FAFAFA, #FF3636);
				}
			}
		}
	
</style>
